package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbOneMapper;
import com.bsb.base.model.BsbOne;
import com.bsb.base.model.BsbOneExample;

@Service
public class BsbOneService{
	
	@Resource
	private BsbOneMapper bsbOneMapper;
	
	public void addBsbOne(BsbOne bsbOne) {
		bsbOneMapper.insertSelective(bsbOne);
	}
	
	public void delBsbOneByUuid(String uuid) {
		bsbOneMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateBsbOne(BsbOne bsbOne) {
		bsbOneMapper.updateByPrimaryKeySelective(bsbOne);
	}
	
	public void updateBsbOneByExample(BsbOne bsbOne,BsbOneExample bsbOneExample){
	    bsbOneMapper.updateByExampleSelective(bsbOne,bsbOneExample);
	}
	
	public BsbOne getBsbOneByUuid(String uuid) {
		return bsbOneMapper.selectByPrimaryKey(uuid);
	}
	
	public List<BsbOne> getPageBsbOne(BsbOneExample bsbOneExample) {
		return bsbOneMapper.selectPage(bsbOneExample);
	}
	
	public int countBsbOne(BsbOneExample bsbOneExample) {
		return bsbOneMapper.countByExample(bsbOneExample);
	}
	
	public List<BsbOne> selectByExample(BsbOneExample example){
	    return bsbOneMapper.selectByExample(example);
	}
}
